package com.BraveY.Demo03;

public class Iphone {
    private String brand;
    private int price;
    private String color;

    // 无参构造方法
    public Iphone() {
    }

    // 有参构造方法
    public Iphone(String brand, int price, String color) {
        this.brand = brand;
        this.price = price;
        this.color = color;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String setBrand() {
        return this.brand;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public int getPrice() {
        return this.price;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getColor() {
        return this.color;
    }

    //定义打电话方法
    public void call() {
        System.out.println("正在使用价格为" + price + "元" + color + "的" + brand + "手机打电话....");
    }

    //定义发短信方法
    public void sendMessage() {
        System.out.println("正在使用价格为" + price + "元" + color + "的" + brand + "手机发短信....");
    }

}
